<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<base href="<%=basePath%>"/>

		<title>部门管理</title>

		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
		<meta http-equiv="description" content="This is my page" />
		<link rel="stylesheet" href="css/style.css" type="text/css"></link>
		<link rel="stylesheet" href="css/style_.css" type="text/css"></link>

	</head>

	<body>
		<center>
		 	<div class="top">
    			&nbsp;<img src="images/index_32.gif"></img>&nbsp;部门员工
  			</div>
			<br />
			<form name="form1" method="post" action="findEmployeesByDepar">
				<table width="95%" border="0" align="center" cellpadding="0"
					cellspacing="0" class="table01">
					<tr>
						<td class="td_02">
							<span class="td_title">员工查询</span>
						</td>
						<td class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							&nbsp;
						</td>
					</tr>
					<tr>
						<td width="10%" class="td_02">
							员工姓名
						</td>
						<td width="40%" class="td_02">
							<input name="employee.userName" type="text" class="input"
								style="width: 95%" />
						</td>
						<td width="10%" class="td_02">
							部门
						</td>
						<td class="td_02">
							<select name="employee.position.department.departmentId" style="width: 95%">
								<option value="">
									--请选择--
								</option>
								<s:iterator value="listDepar">
									<option value="<s:property value='departmentId' />">
										<s:property value="departmentName" />
									</option>
								</s:iterator>
							</select>
						</td>
					</tr>
					<tr>
						<td width="10%" class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							&nbsp;
						</td>
						<td class="td_02">
							<input type="submit" class="buttonface02" value=" 查询 " />
						</td>
					</tr>
				</table>
			</form>
			<table width="95%" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td class="td_page">
						<div align="right">
							<input name="Submit2" type="reset" class="buttonface02"
								value="新增部门" onclick="location.href='AddDepartment.jsp'" />
						</div>
					</td>
				</tr>
			</table>
			<table width="95%" border="0" cellpadding="0" cellspacing="0"
				class="table02" align="center">
				<tr>
					<td height="30" align="right">
						<div align="left"></div>
						<img src="images/1.gif" width="4" height="5" />
						<a href="findEmployeesByDepar?page=1">首页</a>
						<img src="images/2.gif" width="3" height="5" />
						<c:if test="${pageBeans.currentPage==1}">上一页</c:if>
						<c:if test="${pageBeans.currentPage>1}"><a href="findEmployeesByDepar?page=${pageBeans.currentPage-1 }">上一页</a></c:if>
						<c:if test="${pageBeans.currentPage==pageBeans.totalRecords}">下一页</c:if>
						<c:if test="${pageBeans.currentPage<pageBeans.totalRecords}"><a href="findEmployeesByDepar?page=${pageBeans.currentPage+1 }">下一页</a></c:if>
						<img src="images/2-2.gif" width="3" height="5" />
						<a href="findEmployeesByDepar?page=${pageBeans.totalRecords }">末页</a>
						<img src="images/3.gif" width="4" height="5" />
						共 ${pageBeans.totalRecords } 页&nbsp; 第 ${pageBeans.currentPage } 页
					</td>
				</tr>
			</table>
			<table width="95%" border="0" align="center" cellpadding="2"
				cellspacing="0" class="table01">
				<tr>
					<td width="10%" class="td_top">
						用户姓名
					</td>
					<td width="11%" class="td_top">
						所属部门
					</td>
					<td width="14%" class="td_top">
						职 &nbsp;&nbsp;务
					</td>
					<td width="15%" class="td_top">
						直属上级
					</td>
					<td width="20%" class="td_top">
						移动电话
					</td>
					<td width="15%" class="td_top">
						办公电话
					</td>
				</tr>
				<s:iterator value="listEmployees">
					<tr>
						<td class="td_02">
							<font color="#000000">
							<s:property	value="userName" />
							</font>
							<input type="hidden" value="<s:property value='userId'/>" />
						</td>
						<td class="td_02">
							<s:property value="position.department.departmentName " />
						</td>
						<td class="td_02">
							<s:property value="position.positionName" />
						</td>
						<td class="td_02">
							<s:property value="position.nibsName" />
						</td>
						<td class="td_02">
							<s:property value="userPhone" />
						</td>
						<td class="td_02">
							<s:property value="userOfficephone" />
						</td>
					</tr>
				</s:iterator>
			</table>
			<p>
				&nbsp;
			</p>
		</center>
	</body>
</html>
